<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Toaind
 * Date: 5/14/13
 * Time: 10:22 AM
 * To change this template use File | Settings | File Templates.
 */

foreach ($menu as $a){
    if($a->name=='Trang chủ'){
        $class='home';
    }elseif($a->name=='Tin tức'){
        $class='news';
    }elseif($a->name=='Môn phái'){
        $class='class';
    }elseif($a->name=='Tính năng'){
        $class='tinh_nang';
    }elseif($a->name=='Phụ bản'){
        $class='phu_ban';
    }elseif($a->name=='Hướng dẫn'){
        $class='huong_dan';
    }elseif($a->name=='Cộng đồng'){
        $class='cong_dong';
    }elseif($a->name=='Hỗ trợ'){
        $class='ho_tro';
    }
    if(($this->uri->segment(1)==SEO($a->name))){
        $active ='activate';
    }else{
        $active ='';
    }
    if(strpos($a->link,'http')){
        $link= PATH_URL.$a->link;
    }else{
        $link= $a->link;
    }
    echo '<li class="'.$class.' '.$active.'"><a href="'.$link.'">'.$a->name.'</a></li>';
}